-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename 'host' bean parameter to 'bean_host' in tags #59
Conversation
Looks great, thanks @olivielpeau ! Shall we merge it for the 5.4 agent release ? cc @remh |
@remh This PR shoud be mergeable, should I open a PR on https://github.com/DataDog/documentation to document the change ? |
It would be simpler and more efficient to just check the value of the key here and replace it if needed: |
I've thought about it but one problem I had with it is that it would change not only the name of the tag that is sent, but also the name of the bean parameter itself in That's why I did it in two steps: first deal with the bean parameters (and keep the Actually I think there are still a few confusing things about the way we don't clearly separate bean parameters from default tags. For instance I think the |
@@ -74,11 +74,13 @@ public void testBeanTags() throws Exception { | |||
Set<String> tagsSet = new HashSet<String>(Arrays.asList(tags)); | |||
|
|||
// We should find bean parameters as tags | |||
assertEquals(4, tags.length); | |||
assertEquals(5, tags.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix the indentation here please ?
Good point. Looks good to me besides the indentation issues. Can you fix them and then merge the PR ? Thanks! 💥 |
Fixed the indentation issues, merging! |
Rename 'host' bean parameter to 'bean_host' in tags
@yannmh Fixes the case when a bean parameter named 'host' overrides the actual 'host' tag.